package lianXi1;

public class LianXi {
	public static void main(String[] args) {
	/*	int[][] a = new int[2][2];
		a[0][0] = 1;
		a[0][1] = 2;
		a[1][0] = 3;
		a[1][1] = 4;
		int[][] a1= new int[2][2];
		a1[0][0] = 1;
		a1[0][1] = 2;
		a1[1][0] = 3;
		a1[1][1] = 4;
		for(int i = 0; i<a.length;i++) {
			for(int j = 0; j <a[0].length; j++) {
				System.out.print(a[i][j]+"\t");
			}
			System.out.println();
		}
		System.out.println();
		for(int i = 0; i<a.length;i++) {
			int b=a1.length-1;
			b-=i;
			for(int j = 0; j <a[0].length; j++) {
				int c=a1[0].length-1;
				c-=j;
				a[i][j]=a1[b][c];
			}
		}
		for(int i = 0; i<a.length;i++) {
			for(int j = 0; j <a[0].length; j++) {
				System.out.print(a[i][j]+"\t");
			}
			System.out.println();
		}*/
		int[][] a=new int[2][2];
		a[0][0]=1;
		a[0][1]=2;
		a[1][0]=3;
		a[1][1]=4;
		
		int[][] a1=new int[2][2];
		a1[0][0]=1;
		a1[0][1]=2;
		a1[1][0]=3;
		a1[1][1]=4;
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[0].length; j++) {
				System.out.print(a[i][j]+"\t");
			}
			System.out.println();
		}
		System.out.println();
		for (int i = 0; i < a.length; i++) {
			int b=a1.length-1;
			b-=i;
			for (int j = 0; j < a[0].length; j++) {
				int c=a1[0].length-1;
				c-=j;
				a[i][j]=a1[b][c];
			}
		}
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[0].length; j++) {
				System.out.print(a[i][j]+"\t");
			}
			System.out.println();
		}
	}
}
